export default {
    datalist: [],
    subscribe(cd) {
        this.datalist.push(cd)
        // console.log(this.datalist)
    },
    publish(username, name, avatar) {
        this.datalist.forEach(cd => cd(username, name, avatar))
    }
}